using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace TenantManagementService.Interfaces
{
    /// <summary>
    /// 配置服务接口（用于TenantManagement服务）
    /// </summary>
    public interface IConfigurationService
    {
        /// <summary>
        /// 获取配置值
        /// </summary>
        /// <param name="name">配置名称</param>
        /// <param name="namespace">命名空间</param>
        /// <typeparam name="T">配置类型</typeparam>
        /// <returns>配置值</returns>
        Task<T> GetAsync<T>(string name, string @namespace);

        /// <summary>
        /// 设置配置值
        /// </summary>
        /// <param name="name">配置名称</param>
        /// <param name="value">配置值</param>
        /// <param name="namespace">命名空间</param>
        /// <typeparam name="T">配置类型</typeparam>
        /// <returns></returns>
        Task SetAsync<T>(string name, T value, string @namespace);

        /// <summary>
        /// 删除配置
        /// </summary>
        /// <param name="name">配置名称</param>
        /// <param name="namespace">命名空间</param>
        /// <returns></returns>
        Task RemoveAsync(string name, string @namespace);
    }
}